<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/common/taglibs.jsp"%>
<%@page import="com.core.orm.hibernate.SpringSecurityUtils"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>添加用户</title>
		<link href="${ctx}/widgets/validate/jquery.validate.css" type="text/css" rel="stylesheet" />
<script src="${ctx}/widgets/validate/jquery.validate.js" type="text/javascript"></script>
<script src="${ctx}/widgets/validate/messages_cn.js" type="text/javascript"></script>
 <script>
		$(document).ready(function(){
			//聚焦第一个输入框
			$("#userName").focus();
			//为inputForm注册validate函数
			$("#inputForm").validate({
			rules: { 
					"userInfo.userName": {
    					required: true,
    					minlength:6
    				}, 
    				"userInfo.userPhone":{
    				 required:true
    				},
    				"userInfo.userEmail":"email",
    				"userInfo.userAddres":{
    				 required:true
    				}
				},
				messages: {
					"userInfo.userName": {
						required: "请输入用户名",
						minlength:"用户名长度不能小于6"
					},
					"userInfo.userPhone":{
					   required:"手机号码必填"
					},
					"userInfo.userAddres":{
    				 required:"地址必填"
    				}
				}
			});	
		});
		function aa()
		{
		  document.getElementById("xx").innerHTML="<font color=red>禁止粘贴密码</font>";
		  return false;
		}
	</script>
			<style type="text/css"> 
/* CSS Document */ 


#mytable { 
padding: 0; 
margin: 0; 
margin-top: -95px;
} 

caption { 
padding: 0 0 5px 0; 
width: 700px; 
font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; 
text-align: right; 
} 

th { 
font: bold 12px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; 
color: #4f6b72; 
border-right: 1px solid #C1DAD7; 
border-bottom: 1px solid #C1DAD7; 
border-top: 1px solid #C1DAD7; 
letter-spacing: 2px; 
text-transform: uppercase; 
text-align: left; 
padding: 6px 6px 6px 12px; 
background: #7190e0  no-repeat; 
} 
/*power by www.winshell.cn*/ 
th.nobg { 
border-top: 0; 
border-left: 0; 
border-right: 1px solid #C1DAD7; 
background: none; 
} 
td { 
border-right: 0px solid #C1DAD7; 
border-left: 0px solid #C1DAD7; 
border-bottom: 0px solid #C1DAD7; 
background: #fff; 
font-size:12px; 
padding: 6px 6px 6px 12px; 
color: #4f6b72; 
align:center;
} 
td.alt { 
background: #F5FAFA; 
color: #797268; 
} 
th.spec { 
border-left: 1px solid #C1DAD7; 
border-top: 0; 
background: #fff no-repeat; 
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; 
} 
th.specalt { 
border-left: 1px solid #C1DAD7; 
border-top: 0; 
background: #f5fafa no-repeat; 
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; 
color: #797268; 
} 
</style> 
	</head>

	<body>
		<form id="inputForm" action="${ctx}/user/users/addUser.html" method="post">
			<table style="border:1px solid;width:100%">
			<th colspan="2">新增用户</th>
				<tr>
					<td>
						用户名:
					</td>
					<td >
						<input name="userInfo.userName" id="userName">
					</td>
				</tr>
				<tr>
					<td>
						邮件：
					</td>
					<td>
						<input name="userInfo.userEmail" id="userEmail"/>
					</td>
				</tr>
				<tr>
					<td>
						手机号码：
					</td>
					<td>
						<input name="userInfo.userPhone" id="userPhone"/>
					</td>
				</tr>
				<tr>
					<td>
						地址：
					</td>
					<td>
						<input name="userInfo.userAddres" id="userAddres"/>
					</td>
				</tr>
				<tr>
				  <td align=right><input type="submit" value="保存"/></td><td><input type="reset" value="重置"/></td>
				</tr>
			</table>
			</form>
	</body>
</html>
